package com.brainshare.an.mapper;

import java.util.List;
import com.brainshare.an.domain.AnMechanismSettlement;
import com.brainshare.an.domain.AnMechanismSettlementInfo;
import com.brainshare.an.domain.AnMechanismSettlementInfoDto;
import org.apache.ibatis.annotations.Param;

/**
 * 机构佣金Mapper接口
 * 
 * @author liuzheng
 * @date 2022-11-12
 */
public interface AnMechanismSettlementMapper 
{
    /**
     * 查询机构佣金
     * 
     * @param mechanismSettlementId 机构佣金主键
     * @return 机构佣金
     */
    public AnMechanismSettlement selectAnMechanismSettlementByMechanismSettlementId(Long mechanismSettlementId);

    /**
     * 查询机构佣金列表
     * 
     * @param anMechanismSettlement 机构佣金
     * @return 机构佣金集合
     */
    public List<AnMechanismSettlement> selectAnMechanismSettlementList(AnMechanismSettlement anMechanismSettlement);

    /**
     * 新增机构佣金
     * 
     * @param anMechanismSettlement 机构佣金
     * @return 结果
     */
    public int insertAnMechanismSettlement(AnMechanismSettlement anMechanismSettlement);

    /**
     * 修改机构佣金
     * 
     * @param anMechanismSettlement 机构佣金
     * @return 结果
     */
    public int updateAnMechanismSettlement(AnMechanismSettlement anMechanismSettlement);

    /**
     * 删除机构佣金
     * 
     * @param mechanismSettlementId 机构佣金主键
     * @return 结果
     */
    public int deleteAnMechanismSettlementByMechanismSettlementId(Long mechanismSettlementId);

    /**
     * 批量删除机构佣金
     * 
     * @param mechanismSettlementIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteAnMechanismSettlementByMechanismSettlementIds(Long[] mechanismSettlementIds);

    public List<AnMechanismSettlement> checkSettlement(AnMechanismSettlement anMechanismSettlement);

    public List<AnMechanismSettlementInfoDto> selectAnMechanismSettlementInfoList(@Param("mechanismIds") List<Long> mechanismIds);

    public List<AnMechanismSettlement> selectOutTradeNoSettlementList(@Param("outTradeNo") String outTradeNo);

    public int syncNullUserMechanismSettlementInfos();

    public List<AnMechanismSettlementInfo> getEffectiveNumberCount(@Param("mechanismSettlementId") Long mechanismSettlementId);
}
